<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Smile</title>
    
<div th:fragment="head">

  <!-- layuicss依赖 -->  
  <link rel="stylesheet" th:href="@{/static/lib/layui/css/layui.css}">

     <nav id="daohang" class="navbar navbar-expand-md navbar-dark fixed-top" style="background-color: #101010;opacity: 0.8;">
        <a class="navbar-brand" href="#">
            <img src="../static/img/logo.gif" width="60" height="40">
        </a>
        
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#myNav" onclick="bj()">
            <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse" id="myNav">
           <ul class="navbar-nav mr-auto" id="daohang">
               <li class="nav-item active ">
                 <a class="nav-link" href="/blog/index"> <span><i class="layui-icon layui-icon-home" style="font-size:15px;color: white;"></i></span> <span style="margin-left: 3px">首页</span> </a>
               </li>
               <li class="nav-item ">
                <a class="nav-link" href="/types"><span><i class="layui-icon layui-icon-list" style="font-size:15px; color: white;"></i></span> <span> 分类</span></a>
               </li>
            
               
               <li class="nav-item dropdown">
                 <a class="nav-link dropdown-toggle" href="#"  role="button" data-toggle="dropdown" >
                 <i class="layui-icon  layui-icon-tabs" style="font-size:15px; color: white;"></i>  归档
                 </a>
        
               <div class="dropdown-menu">
                  <a class="dropdown-item" href="/archived"><i class="layui-icon layui-icon-chart" style="font-size:15px;"></i>  博文统计</a>
                  <a class="dropdown-item" href="/log"><i class="layui-icon layui-icon-edit" style="font-size:15px;"></i> 小站日志</a>
               </div>
             </li>
            
               
             <!--  <li class="nav-item" >
                 <a class="nav-link" onclick="alert('敬请期待')" ><span><i class="layui-icon  layui-icon-log" style="font-size:15px; color: white;"></i></span><span style="margin-left:3px">点点滴滴</span></a>
               </li>
            -->   
              
              <li class="nav-item">
                 <a class="nav-link" href="/blogroll"><span><i class="layui-icon layui-icon-link" style="font-size:15px; color: white;"></i></span><span  style="margin-left:4px">友情链接</span></a>
              </li>
              
              <li class="nav-item dropdown">
                 <a class="nav-link dropdown-toggle" href="#"  role="button" data-toggle="dropdown" >
                 <i class="layui-icon  layui-icon-app" style="font-size:15px; color: white;"></i>  小工具
                 </a>
        
               <div class="dropdown-menu">
                  <a class="dropdown-item" href="/QRcode"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-fullscreen" viewBox="0 0 16 16"><path d="M1.5 1a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0v-4A1.5 1.5 0 0 1 1.5 0h4a.5.5 0 0 1 0 1h-4zM10 .5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 16 1.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5zM.5 10a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 0 14.5v-4a.5.5 0 0 1 .5-.5zm15 0a.5.5 0 0 1 .5.5v4a1.5 1.5 0 0 1-1.5 1.5h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5z"/></svg> 
                      生成二维码</a>
                  <a class="dropdown-item" href="/music"><i class="layui-icon  layui-icon-component" style="font-size:15px;"></i>  音乐盒</a>
                  <a class="dropdown-item" href="/phototype"><i class="layui-icon  layui-icon-picture" style="font-size:15px;"></i> 相册</a>       
                  <a class="dropdown-item" href="https://www.xpdf.cn" target="_blank"><i class="layui-icon  layui-icon-file-b" style="font-size:15px;"></i> 文档转换 </a>
           
  
               </div>
               
             </li>
              
              
               
                 
               <li class="nav-item dropdown">
                 <a class="nav-link dropdown-toggle" href="#"  role="button" data-toggle="dropdown" >
                 <i class="layui-icon layui-icon-about" style="font-size:15px; color: white;"></i>  关于
                 </a>
        
               <div class="dropdown-menu">
                  <a class="dropdown-item" href="/about"><i class="layui-icon layui-icon-website" style="font-size:15px"></i>  关于本站</a>
                   <a class="dropdown-item" href="/admin"><i class="layui-icon layui-icon-set-fill" style="font-size:15px"></i>  后台管理系统</a> 
               </div>
             </li>
               
               


               <li class="nav-item" th:if="${session.user==null}">
                     <a class="nav-link" href="/login"><span><i class="layui-icon layui-icon-user" style="font-size:15px; color: white;"></i></span><span  style="margin-left:4px">登录/注册</span></a>
               </li>
               
               
               <li class="nav-item dropdown" th:if="${session.user!=null}">
                 <a class="nav-link dropdown-toggle" href="#"  role="button" data-toggle="dropdown" >
                         <img th:src="${session.user.imgUrl}" id="UserHeadImg" style="border-radius:50%;width: 20px ">     
                         <span th:text="${session.user.nickname}"> </span>
                 </a>
             
               <div class="dropdown-menu">
                   <a class="dropdown-item" th:onclick="mydata([[${session.user.id}]])"> <i class="layui-icon layui-icon-username"></i> 个人信息</a>
                   <button class="dropdown-item" onclick="qqLoginOut()"><i class="layui-icon layui-icon-face-cry"></i>  退出登录</button>
               </div>
             </li>
             
           
           </ul>
           
            <form  class="form-inline my-2 my-lg-0" action="/search">
                <input class="form-control mr-sm-2" type="search" name="keyword" placeholder="搜索博文" >
                <button  class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
            </form>
             
        
        </div>
    </nav>
 
   <!-- 动画 -->
     <div id="bodys">
           <div id="particles"  style="background:#101010">
             <div class="overlay"></div>
             <div id="intro"></div>
          </div>
      </div>

  <script type="text/javascript">
    function qqLoginOut(){
      $.post("/qqLoginOut");
      window.location.reload();  
    }
    
     function mydata(id){
      window.location.href = "/user?id="+id;  
    }
    
    
  </script>

</div>


</head>
</html>